﻿using SD.ContentSystem.IAppService.DTOs.Outputs;
using SD.Infrastructure.AppServiceBase;
using SD.Infrastructure.DTOBase;
using System;
using System.ServiceModel;

namespace SD.ContentSystem.IAppService.Interfaces
{
    /// <summary>
    /// 消息服务契约接口
    /// </summary>
    [ServiceContract(Namespace = "http://SD.CMS.IAppService.Interfaces")]
    public interface IMessageContract : IApplicationService
    {
        //命令部分

        #region # 创建消息 —— void CreateMessage(string title, string content...
        /// <summary>
        /// 创建消息
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="content">内容</param>
        /// <param name="contact">联系人</param>
        /// <param name="phoneNo">联系电话</param>
        /// <param name="email">电子邮箱</param>
        [OperationContract]
        void CreateMessage(string title, string content, string contact, string phoneNo, string email);
        #endregion

        #region # 回复消息 —— void ReplyMessage(Guid messageId, string feedBack)
        /// <summary>
        /// 回复消息
        /// </summary>
        /// <param name="messageId">消息Id</param>
        /// <param name="feedBack">回复内容</param>
        [OperationContract]
        void ReplyMessage(Guid messageId, string feedBack);
        #endregion


        //查询部分

        #region # 获取消息 —— MessageInfo GetMessage(Guid messageId)
        /// <summary>
        /// 获取消息
        /// </summary>
        /// <param name="messageId">消息Id</param>
        /// <returns>消息</returns>
        [OperationContract]
        MessageInfo GetMessage(Guid messageId);
        #endregion

        #region # 分页获取消息列表 —— PageModel<MessageInfo> GetMessageByPage(string keywords...
        /// <summary>
        /// 分页获取消息列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <returns>消息列表</returns>
        [OperationContract]
        PageModel<MessageInfo> GetMessageByPage(string keywords, int pageIndex, int pageSize);
        #endregion
    }
}
